package com.ruoyi.shopping.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品收藏管理对象 commodity_collect
 *
 * @author fxy
 * @date 2024-08-14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommodityCollect extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    @Excel(name = "ID")
    private Long id;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long commodityId;

    /** 商品实体 */
    @TableField(exist = false)
    private Commodity commodity;

    /** 货主ID */
    @Excel(name = "货主ID")
    private Long cargoUserId;

    /** 逻辑删除 */
    private Long del;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCommodityId(Long commodityId)
    {
        this.commodityId = commodityId;
    }

    public Long getCommodityId()
    {
        return commodityId;
    }
    public void setCargoUserId(Long cargoUserId)
    {
        this.cargoUserId = cargoUserId;
    }

    public Long getCargoUserId()
    {
        return cargoUserId;
    }
    public void setDel(Long del)
    {
        this.del = del;
    }

    public Long getDel()
    {
        return del;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("commodityId", getCommodityId())
            .append("cargoUserId", getCargoUserId())
            .append("del", getDel())
            .toString();
    }
}
